package com.google.android.gms.common;

import android.os.Parcel;
import android.os.Parcelable.Creator;
import androidx.annotation.Nullable;
import com.google.android.gms.common.annotation.KeepForSdk;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Class;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Constructor;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Field;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Param;
import o.aoz;
import o.apc;
import o.apu;

@KeepForSdk
@Class(creator = "FeatureCreator")
public class Feature extends AbstractSafeParcelable {
    public static final Creator<Feature> CREATOR = new apu();
    @Field(getter = "getOldVersion", id = 2)
    @Deprecated
    private final int ˊ;
    @Field(defaultValue = "-1", getter = "getVersion", id = 3)
    private final long ˎ;
    @Field(getter = "getName", id = 1)
    private final String ॱ;

    @Constructor
    public Feature(@Param(id = 1) String str, @Param(id = 2) int i, @Param(id = 3) long j) {
        this.ॱ = str;
        this.ˊ = i;
        this.ˎ = j;
    }

    @KeepForSdk
    public String ॱ() {
        return this.ॱ;
    }

    @KeepForSdk
    public long ˊ() {
        return this.ˎ == -1 ? (long) this.ˊ : this.ˎ;
    }

    public void writeToParcel(Parcel parcel, int i) {
        int ॱ = apc.ॱ(parcel);
        apc.ˎ(parcel, 1, ॱ(), false);
        apc.ॱ(parcel, 2, this.ˊ);
        apc.ˊ(parcel, 3, ˊ());
        apc.ˎ(parcel, ॱ);
    }

    public boolean equals(@Nullable Object obj) {
        if (!(obj instanceof Feature)) {
            return false;
        }
        Feature feature = (Feature) obj;
        if (((ॱ() == null || !ॱ().equals(feature.ॱ())) && (ॱ() != null || feature.ॱ() != null)) || ˊ() != feature.ˊ()) {
            return false;
        }
        return true;
    }

    public int hashCode() {
        return aoz.ॱ(ॱ(), Long.valueOf(ˊ()));
    }

    public String toString() {
        return aoz.ˋ(this).ॱ("name", ॱ()).ॱ("version", Long.valueOf(ˊ())).toString();
    }
}
